package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * 砍价用户对象 mall_goods_cut_user
 *
 * @author wangkai
 * @date 2021-11-04
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_goods_cut_order")
@Builder
public class MallGoodsCutOrder extends BaseEntity<MallGoodsCutOrder> {
    private static final long serialVersionUID = 1L;


    /**
     * 商城砍价订单(先于订单主表、商城订单生成)
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Integer id;


    /**
     * 砍价id
     */
    @Excel(name = "砍价id")
    @ApiModelProperty(value = "砍价id")
    @TableField("`cut_id`")
    private Long cutId;

    /**
     * 砍价编号
     */
    @Excel(name = "砍价编号")
    @ApiModelProperty(value = "砍价编号")
    @TableField("`cut_sn`")
    private String cutSn;


    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    @ApiModelProperty(value = "订单编号")
    @TableField("`order_sn`")
    private String orderSn;


    /**
     * 用户uid
     */
    @Excel(name = "用户uid")
    @ApiModelProperty(value = "用户uid")
    @TableField("`uuid`")
    private Long uuid;


    /**
     * 商品id
     */
    @Excel(name = "商品id")
    @ApiModelProperty(value = "商品id")
    @TableField("`goods_id`")
    private Long goodsId;


    /**
     * 货品id
     */
    @Excel(name = "货品id")
    @ApiModelProperty(value = "货品id")
    @TableField("`product_id`")
    private Long productId;


    /**
     * 用户昵称
     */
    @Excel(name = "用户昵称")
    @ApiModelProperty(value = "用户昵称")
    @TableField("`user_nick_name`")
    private String userNickName;


    /**
     * 用户头像
     */
    @Excel(name = "用户头像")
    @ApiModelProperty(value = "用户头像")
    @TableField("`user_head_img`")
    private String userHeadImg;


    /**
     * 砍价结束时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "砍价结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`end_time`")
    private LocalDateTime endTime;


    /**
     * 砍价最多人数
     */
    @Excel(name = "砍价最多人数")
    @ApiModelProperty(value = "砍价最多人数")
    @TableField("`cut_peoples`")
    private Long cutPeoples;


    /**
     * 砍价剩余人数
     */
    @Excel(name = "砍价剩余人数")
    @ApiModelProperty(value = "砍价剩余人数")
    @TableField("`cut_remaining`")
    private Long cutRemaining;


    /**
     * 可砍价金额
     */
    @Excel(name = "可砍价金额")
    @ApiModelProperty(value = "可砍价金额")
    @TableField("`cut_money`")
    private BigDecimal cutMoney;


    /**
     * 砍价剩余金额
     */
    @Excel(name = "砍价剩余金额")
    @ApiModelProperty(value = "砍价剩余金额")
    @TableField("`cut_balance`")
    private BigDecimal cutBalance;


    /**
     * 砍价状态 1砍价成功 2砍价中 3砍价失败
     */
    @Excel(name = "砍价状态")
    @ApiModelProperty(value = "砍价状态")
    @TableField("`cut_status`")
    private Integer cutStatus;

    /**
     * 拓展记录
     */
    @Excel(name = "拓展记录")
    @ApiModelProperty(value = "拓展记录")
    @TableField(exist = false)
    private String record;


    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;

    /**
     * 租户ID
     */
    @Excel(name = "租户ID")
    @ApiModelProperty(value = "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;


}
